package com.flong.jxl.fl;
import java.io.File;
import java.net.URL;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import com.flong.common.IoUtil;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;

public class ReadExcelInfo3 {
	public static void main(String[] args)throws Exception { 
		

		
		String path = "d://T2.xls";
		
		Workbook book = Workbook.getWorkbook(new File(path));
		Sheet sheet = book.getSheet(1);
		int rows = sheet.getRows();
		
		
		
		String content ="";
		for (int i = 1; i <rows; i++) {
			Cell cell = sheet.getCell(0, i);
			String text = cell.getContents().trim().replace("", "");
			if(text!=null && !"".equals(text)){
					Document doc =Jsoup.parse(new URL(text), 30000);
					if(doc!=null){
						String biao_ti= doc.select("div[class='cont-list']").select("div[class='lh24 tit-pr']").text();
						String wt= doc.select("div[class='cont-box']").select("p:eq(0)").text();
						content += biao_ti+"="+wt+"\n";
						
					}
			}
		}
		
		System.out.println(content);
		
		// IoUtil.Writer(content, "D://test.txt");
		 System.out.println("处理OK");
		book.close();
	
	}
		 
}